
/**
 * Holds the structure of our Metric
 * @author Jared Lindblom
 * */
public class Metric {
	private double distanceWeight, numVehiclesWeight;
	
	public Metric(double distanceWeight, double numVehiclesWeight) {
		this.distanceWeight = distanceWeight;
		this.numVehiclesWeight = numVehiclesWeight;
	}
	
	public Metric(){
		this.distanceWeight = 0.0;
		this.numVehiclesWeight = 0.0;
	}
	
	/**
	 * Returns the calculated weight of the road using metric values
	 * @param distance		The distance (length) of the road.
	 * @param numVehicles	The number of vehicles on the road.
	 * @return	The weight of the road.
	 */
	public double calculateWeight(double distance, double numVehicles) {
		double result = ((distance * distanceWeight) + (numVehicles * numVehiclesWeight));
		//System.out.println("distance:distanceWeight"+distance+":"+distanceWeight+"numVehivles:numVehiclesWeight"+numVehicles+":"+numVehiclesWeight+"result"+result);
		//return distance;
		return result;
	}
	
	public double getDistanceWeight(){
		return this.distanceWeight;
	}
	
	public double getNumVehiclesWeight(){
		return this.numVehiclesWeight;
	}
}
